﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ivony.Data;
using XCommunity.Frames;

namespace XCommunity.Data
{
  public class BoardFrameDataProvider
  {

    public static SqlDbUtility DbUtility = new SqlDbUtility( @"Data Source=(local);Initial Catalog=XCommunity;Integrated Security=True" );


    /// <summary>
    /// 为实体版发布一个话题（Topic）
    /// </summary>
    /// <param name="board">要发布的实体版面</param>
    /// <param name="topic">要发布的话题</param>
    /// <param name="jurisdiction">版面是否拥有管辖权</param>
    public void AddTopic( PracticalBoardFrame board, TopicMeta topic )
    {

      DbUtility.ExecuteNonQuery( "INSERT INTO BoardFrameTopics ( BoardId, TopicId ) VALUES ( {...} )", board.PracticalDataId, topic.TopicId );

    }
  }
}
